{template 'common/header'}
<ul class="nav nav-tabs">
    <li ><a href="{php echo url('finance/finance/list');}">库款划拨信息列表</a></li>
    <li ><a href="{php echo url('finance/finance/post');}">增加库款划拨信息</a></li>
    {if $do=='audit'}
    <li class="active" ><a href="{php echo url('finance/finance/audit');}">审核库款划拨信息</a></li>
    {else}
    <li class="active" ><a href="{php echo url('finance/finance/audit');}">查看库款划拨信息</a></li>
    {/if}
</ul>
<div class="clearfix">
    <form action="" method="post"  class="form-horizontal" role="form" enctype="multipart/form-data" id="form1">
        <input type="hidden" name="id" value="{$id}">
        <div class="panel panel-default">
            <div class="panel-body">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">机关代字</label>
                    <div class="col-sm-6">
                        <input type="text" name="agency" class="form-control" value="{$row['agency']}" disabled="true"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">年份</label>
                    <div class="col-sm-6">
                        <input type="text" id="fileyear" name="fileyear" class="form-control" value="{$row['fileyear']}" disabled="true"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">文号</label>
                    <div class="col-sm-6">
                        <input type="text" id="fileid" name="fileid" class="form-control" value="{$row['fileid']}" disabled="true"  />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">文件首页</label>
                    <div class="col-sm-6" style="margin-top:.5em;">
                        <img src="{$_W['attachurl']}{$row['firstpage']}" class="img-responsive img-thumbnail" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">总金额</label>
                    <div class="col-sm-6">
                        <input type="text" id="totlamoney" name="totalmoney" class="form-control" value="{$row['totalmoney']}" disabled="true"/>
                    </div>
                </div>
                {if $row['num']>0}
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">已拨金额</label>
                    <div class="col-sm-6">
                        <input type="text" id="money" name="money" class="form-control" value="{$row['money']}" readonly="readonly"  />
                    </div>
                </div>
                {/if}
                {if $list}
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">划拨记录</label>
                    <div class="col-sm-6">

                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th style="width:70px;">划拨金额</th>
                                <th style="width:60px;">状态</th>
                                <th style="width:60px;">创建人</th>
                                <th style="width: 70px;">拨款日期</th>
                            </tr>
                            </thead>
                            <tbody>
                            {loop $list $r}
                            <tr>
                                <td>{$r['money']}</td>
                                <td>{$status[$r['status']]}</td>
                                <td>{$r['creator']}</td>
                                <td>{php echo date('Y-m-d', $r['grandedate'])}</td>
                            </tr>
                            {/loop}
                            </tbody>
                        </table>
                    </div>
                </div>
                {/if}

                {if $item}
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">划拨签名</label>
                    <div class="col-sm-6" style="margin-top:.5em;">
                        <img src="{$_W['attachurl']}{$item['signpage']}" class="img-responsive img-thumbnail" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">本次划拨金额</label>
                    <div class="col-sm-6">
                        <input type="text" name="money" class="form-control" value="{$item['money']}" disabled="true" />
                    </div>
                </div>
                {/if}
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-3 col-lg-2 control-label"></label>
            <div class="col-sm-10">
                {if $do=='audit'}
                <button type="submit" class="btn btn-success btn-lg" name="submit" value="pass"><i class="fa fa-circle-o"></i>通过</button>&nbsp;&nbsp;
                <button type="submit" class="btn btn-danger btn-lg" name="submit" value="unpass"><i class="fa fa-ban"></i>不通过</button>&nbsp;&nbsp;
                <a  class="btn btn-primary"  href="{php echo url('sms/finance/list');}">取 消</a>
                {/if}
                <input type="hidden" name="token" value="{$_W['token']}" />
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    require(['jquery']);

</script>
{template 'common/footer'}